home *** CD-ROM | disk | FTP | other *** search
/ iBrowse Update Disc / iBrowse Update Disc.iso / distrib / man / Manuals / Internet / Pages / appxb < prev    next >
Text File  |  1998-02-04  |  47KB  |  1,150 lines

  1. <HTML>
  2. <HEAD>
  3. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
  4. <TITLE>Acorn Internet: Writing command scripts</TITLE>
  5.  
  6. <META NAME="GENERATOR" CONTENT="Internet Assistant for Microsoft Word 2.04z">
  7. </HEAD>
  8. <BODY>
  9. <P>
  10. <TABLE WIDTH=100%>
  11. <TR><TD>
  12. <BODY bgcolor="#ffffff"><A NAME="_Toc401045896"><FONT SIZE=6>Appendix B: Writing Acorn Internet <A NAME="Command">Command</A> Scripts</FONT></A>
  13. </TD><TD ALIGN="RIGHT" WIDTH=200><A HREF="appxa"><IMG SRC="MiscImages/PREV" WIDTH="36" HEIGHT="36" BORDER="0"></A>
  14. <A HREF="../Cover"><IMG SRC="MiscImages/START" WIDTH="36" HEIGHT="36" BORDER="0"></A>
  15. <A HREF="prelms"><IMG SRC="MiscImages/CONTS" WIDTH="36" HEIGHT="36" BORDER="0"></A>
  16. <A HREF="appxc"><IMG SRC="MiscImages/NEXT" WIDTH="36" HEIGHT="36" BORDER="0"></A>
  17. </TD></TR>
  18. </TABLE>
  19. <HR>
  20. <H2><A NAME="Introduction">Introduction</A></H2>
  21. <P>
  22. <FONT SIZE=3>One of the most useful facilities for setting up
  23. an Acorn Internet system is its scripting language. This language
  24. gives you the flexibility to configure it so that it can operate
  25. with a wide range of connection and authentication interfaces
  26. used by Internet service providers, and automate the procedure
  27. for connecting your system to the Internet so that your machine
  28. can download your email and USENET News at any configured time
  29. of day. </FONT>
  30. <P>
  31. <FONT SIZE=3>This Appendix leads you through a typical script,
  32. and contains further details about IP allocation in Acorn Internet
  33. software and its requirements regarding protocols which must be
  34. supported by service providers, in addition to supplying a reference
  35. to the Acorn Internet software script command set. </FONT>
  36. <H2><A NAME="Protocols">Protocols</A> and Interfaces</H2>
  37. <P>
  38. <FONT SIZE=3>Currently, Acorn Internet software is capable of
  39. transmitting and receiving IP datagrams as SLIP packets, PPP packets
  40. or "unwrapped" IP packets.</FONT>
  41. <P>
  42. <FONT SIZE=3>SLIP provides a point-to-point connection between
  43. two devices for the transmission of Internet datagrams; the devices
  44. can be either two computers, or a computer and an Internet router.
  45. SLIP modifies a standard Internet datagram by appending a special
  46. SLIP END character to it, which allows datagrams to be distinguished
  47. as separate when transmitted serially. </FONT>
  48. <P>
  49. <FONT SIZE=3>PPP provides a point-to-point connection as well.
  50. The advantage PPP has over SLIP is that it can compress the header
  51. information (which contains such information as the intended destination
  52. of the packet), and test the integrity of inter-system connections,
  53. rerouting packets where appropriate. PPP will also take care of
  54. much of the connection configuration, thus making life easier
  55. for Acorn Internet software script authors. </FONT>
  56. <P>
  57. <FONT SIZE=3>The Acorn Internet PPP driver supports the "block
  58. driver" interface, which has been available for some time
  59. as a Freeware interface specification and conformant device driver
  60. set. This now means that, in addition to the internal serial port,
  61. third party devices such as high-speed dual serial port cards
  62. may be used which enable pre-Risc PC machines to exchange data
  63. with a modem at rates >19200 baud. Whichever physical interface
  64. is used, the PPP driver refers to it as "ppp0" (PPP
  65. port 0). </FONT>
  66. <P>
  67. <FONT SIZE=3>If you have a direct Ethernet connection to the Internet
  68. (e.g. via ISDN), Acorn Internet software can make use of this
  69. as well.</FONT>
  70. <P>
  71. <FONT SIZE=3>The use of SLIP or PPP only affects the fundamental
  72. IP layer, and is therefore transparent to the upper-layer protocols;
  73. hence service-oriented protocols such as SMTP (email), NNTP (USENET
  74. News), FTP (File Transfer Protocol), HTTP (World Wide Web) and
  75. other equivalent-layer protocols such as telnet will all work
  76. correctly over SLIP or PPP.</FONT>
  77. <P>
  78. <FONT SIZE=3>Other factors to bear in mind are that the configuration
  79. of Acorn Internet software is subtly different depending on whether
  80. your provider allocates you a fixed IP address or has dynamic
  81. IP allocation (in which your IP address is determined as part
  82. of each logon procedure), and that the Point of Presence (PoP)
  83. you plan to use supports modem speeds up to the maximum rate supported
  84. by your own modem, subject to the limitations imposed by the serial
  85. port (see Acorn Customer Services Application Note 234 for further
  86. details).</FONT>
  87. <H2><A NAME="Anatomy">Anatomy</A> of a logon script</H2>
  88. <P>
  89. <FONT SIZE=3>The following paragraphs provide a line-by-line dissection
  90. of a typical Acorn Internet software logon script; lines printed
  91. in Courier comprise the script itself. The scripts themselves
  92. are stored with the leafname "Script" in the directory
  93. relevant to the service provider in the !Connect.Providers hierarchy;
  94. for example, the script for Demon Internet Services is stored
  95. as "!Connect.Providers.Demon.Script". The remaining
  96. files in the !Connect.<provider> directory contain details
  97. of the telephone numbers of the currently-known Points of Presence
  98. (PoPs) used by each provider.</FONT>
  99. <P>
  100. <TT>#Demon Internet SLIP</FONT></TT><FONT SIZE=3>
  101. </FONT>
  102. <P>
  103. <FONT SIZE=3>This line is a comment, as it starts with a #. In
  104. this case, the line just signifies that this script is intended
  105. for use when connecting to Demon Internet Services, in this case
  106. using the SLIP protocols. Comments can be freely distributed throughout
  107. the script.</FONT>
  108. <P>
  109. <TT>retry 5 5 10 </FONT></TT>
  110. <P>
  111. <FONT SIZE=3>Set the connection retry system so that connection
  112. is attempted five times. The delay between the first and second
  113. attempts is five seconds, after which it tries at 10 second intervals.
  114. </FONT>
  115. <P>
  116. <TT>NewsRetry 50 </FONT></TT>
  117. <P>
  118. <FONT SIZE=3>Sets the connection retry system to attempt up to
  119. 50 retries when contacting the USENET News server.</FONT>
  120. <P>
  121. <TT>*rmensure slip 2.07 rmload System:Modules.Network.SLIP
  122. </FONT></TT>
  123. <P>
  124. <TT>*rmensure slip 2.07 Error Slip version
  125. 2.07 or later is required </FONT></TT>
  126. <P>
  127. <FONT SIZE=3>These lines ensure that the correct version of the
  128. SLIP driver is loaded. </FONT>
  129. <P>
  130. <FONT SIZE=3>If you are using the PPP driver, replace these lines
  131. with:</FONT>
  132. <P>
  133. <TT>*rmensure PPP 1.02 rmload System:Modules.Network.PPP
  134. </FONT></TT>
  135. <P>
  136. <TT>*rmensure PPP 1.02 Error PPP version
  137. 1.02 or later is required</FONT></TT>
  138. <P>
  139. <TT>+ifconfig -e sl0 down </FONT></TT>
  140. <P>
  141. <FONT SIZE=3>This switches the SLIP driver off; all transactions
  142. which take place between this line of the script and a line containing
  143. ifconfig -e sl0 up take place using "ordinary" V.nn
  144. modem protocols and flow control. The PPP driver initialises in
  145. a switched-off state, so this line can be omitted in the case
  146. of PPP being used. The use of a "+" as opposed to a
  147. "*" to prefix the command signifies that, if the command
  148. should fail to execute successfully, it should fail silently and
  149. hence allow the login script to continue executing rather than
  150. aborting and reporting an error.</FONT>
  151. <P>
  152. <TT>SerialSetup </FONT></TT>
  153. <P>
  154. <FONT SIZE=3>This initialises the serial port to the appropriate
  155. baud rate, word length, parity etc.</FONT>
  156. <P>
  157. <TT>Timeout 10</FONT></TT><FONT SIZE=3> </FONT>
  158. <P>
  159. <FONT SIZE=3>This is used by the Wait command; a Wait is now configured
  160. to time out (reporting an error, terminating the script and closing
  161. the serial connection) 10 seconds after it is encountered.</FONT>
  162. <P>
  163. <TT>Abort Busy </FONT></TT>
  164. <P>
  165. <TT>Abort Carrier </FONT></TT>
  166. <P>
  167. <TT>Abort incorrect </FONT></TT>
  168. <P>
  169. <TT>Abort tone </FONT></TT>
  170. <P>
  171. <FONT SIZE=3>If any of the strings following "Abort"
  172. are sent to the computer by the modem during the next phase of
  173. establishing the connection, the script will close the connection
  174. to the modem and terminate.</FONT>
  175. <P>
  176. <TT>Echo </FONT></TT>
  177. <P>
  178. <FONT SIZE=3>Tells the system to start copying incoming data to
  179. its logging system.</FONT>
  180. <P>
  181. <TT>Send ATZ</FONT></TT><FONT SIZE=3> </FONT>
  182. <P>
  183. <FONT SIZE=3>Sends the Hayes command string to the modem to reset
  184. it to its default configuration.</FONT>
  185. <P>
  186. <TT>Wait OK </FONT></TT>
  187. <P>
  188. <FONT SIZE=3>Pauses until the string "OK" is sent to
  189. the computer by the modem, or generates an error, closes the connection
  190. and terminates the script if "OK" is not received before
  191. 10 seconds have elapsed.</FONT>
  192. <P>
  193. <TT>Init</FONT></TT><FONT SIZE=3> </FONT>
  194. <P>
  195. <FONT SIZE=3>Sends the configured initialisation string to the
  196. modem.</FONT>
  197. <P>
  198. <TT>Wait OK </FONT></TT>
  199. <P>
  200. <FONT SIZE=3>As above.</FONT>
  201. <P>
  202. <TT>Timeout 120 </FONT></TT>
  203. <P>
  204. <TT>Dial</FONT></TT><FONT SIZE=3> </FONT>
  205. <P>
  206. <FONT SIZE=3>Resets the Wait timeout to 120 seconds, and uses
  207. the configured dialling method to contact the service provider.</FONT>
  208. <P>
  209. <TT>Wait ogin: </FONT></TT>
  210. <P>
  211. <FONT SIZE=3>Waits until the string "ogin:" is received,
  212. or until 120 seconds have elapsed. As the "L" at the
  213. front of "Login:" varies from upper to lower case between
  214. service providers (and occasionally between PoPs run by the same
  215. service provider), it has been omitted from the test.</FONT>
  216. <P>
  217. <TT>Timeout 60 </FONT></TT>
  218. <P>
  219. <TT>Login </FONT></TT>
  220. <P>
  221. <FONT SIZE=3>Modified the timeout period again, and sends the
  222. configured login name terminated by a carriage return.</FONT>
  223. <P>
  224. <TT>Wait assword: </FONT></TT>
  225. <P>
  226. <TT>Password </FONT></TT>
  227. <P>
  228. <FONT SIZE=3>Waits for the tail end of the "Password:"
  229. prompt from the service provider, and sends the configured password
  230. in response.</FONT>
  231. <P>
  232. <TT>Wait ocol: </FONT></TT>
  233. <P>
  234. <TT>Send idle=120,SLIP</FONT></TT><FONT SIZE=3>
  235. </FONT>
  236. <P>
  237. <FONT SIZE=3>This is a part of the connection dialogue which appears
  238. to be operational for a number of service providers, although
  239. the inclusion of the "idle" response seems unique to
  240. Demon Internet Services; the service provider requests details
  241. of the protocol you will be running once your full IP connection
  242. is brought up. "ocol:" is the tail-end of Demon's "Protocol:"
  243. query; everything following the "Send" in the line below
  244. it is sent verbatim in response. If you were using the PPP driver
  245. you would have the line</FONT>
  246. <P>
  247. <TT>Send idle=120,PPP </FONT></TT>
  248. <P>
  249. <FONT SIZE=3>instead. You may also wish to "fine-tune"
  250. the timeout value.</FONT>
  251. <P>
  252. <TT>Wait ddress: </FONT></TT>
  253. <P>
  254. <TT>GetIP </FONT></TT>
  255. <P>
  256. <FONT SIZE=3>This operation will, if dynamic IP allocation is
  257. enabled, configure your machine to use the IP address returned
  258. for this session by the service provider (see below); otherwise,
  259. if you have a static IP address, it will be ignored.</FONT>
  260. <P>
  261. <TT>Wait HELLO</FONT></TT><FONT SIZE=3> </FONT>
  262. <P>
  263. <FONT SIZE=3>In the case of Demon Internet Services, "HELLO"
  264. signifies that the logon and configuration procedure is complete;
  265. from here on, data sent to you by the service provider will comprise
  266. SLIP packets. Your own service provider may use a different string;
  267. check the documentation accompanying your contract with them for
  268. details.</FONT>
  269. <P>
  270. <TT>Config sl0</FONT></TT><FONT SIZE=3> </FONT>
  271. <P>
  272. <FONT SIZE=3>This sets up the broadcast address, netmask etc which
  273. will be used by the SLIP interface during the session</FONT>
  274. <P>
  275. <TT>+ifconfig -e sl0 up </FONT></TT>
  276. <P>
  277. <FONT SIZE=3>This line activates the SLIP driver, bringing you
  278. fully online.</FONT>
  279. <P>
  280. <TT>Route </FONT></TT>
  281. <P>
  282. <FONT SIZE=3>This sets up the IP routing system between you and
  283. your service provider, taking into account which PoP you are using
  284. and which modem you are connected to at that PoP automatically.</FONT>
  285. <P>
  286. <FONT SIZE=3>If you are using the PPP driver you can ignore the
  287. above three commands. Instead you need to replace then with the
  288. following two lines.</FONT>
  289. <P>
  290. <TT>*pppconnect InternalPC 0 noipdefault
  291. defaultroute crtscts modem asyncmap 0 getifaddr ppp0</FONT></TT>
  292. <P>
  293. <FONT SIZE=3>This tells the PPP module to connect to the device
  294. "InternalPC" (which is the internal serial port using
  295. a standard PC cable to connect to the modem) using the speed already
  296. defined on the serial port, setting up all that is needed automatically.
  297. If you are using an Acorn-style cable (as described in Acorn Customer
  298. Services Application Note 234, and intended for use with systems
  299. fitted with 6551 serial controller ICs) "InternalPC"
  300. should be replaced with "Internal". For external and
  301. third party high speed serial adaptors, details of the appropriate
  302. interface name should be supplied with the interface. Your modem
  303. must be configured to use RTS/CTS, to hang up when DTR is dropped
  304. and to make DCD follow the state of the line.</FONT>
  305. <P>
  306. <FONT SIZE=3>The remaining parameters used by *pppconnect are
  307. detailed, along with all other *pppconnect options, in <A HREF="#pppconnect" >pppconnect for RISC OS</A>.</FONT>
  308. <H2><A NAME="Writing">Writing</A> your Own Scripts</H2>
  309. <P>
  310. <FONT SIZE=3>The script above is designed to work with Points
  311. of Presence (PoPs) run by Demon Internet Services; if you are
  312. using a different service provider, you may well find that the
  313. detail of the logon procedure differs from the one above, or you
  314. may have to re-tune your timeout thresholds. Up to the point where
  315. the service provider is dialled, however, it should be possible
  316. to duplicate the script "as is" depending upon the reaction
  317. of your modem to standard Hayes commands.</FONT>
  318. <P>
  319. <FONT SIZE=3>The details supplied by your service provider when
  320. you take out your contract with them should provide sufficient
  321. information to write a script which will operate with their logon
  322. procedures, however tuning the timeouts can be a fine art and
  323. is best judged by experience.</FONT>
  324. <H2><A NAME="Handling">Handling</A> Dynamic IP Allocation</H2>
  325. <P>
  326. <FONT SIZE=3>Acorn Internet software is capable of handling the
  327. dynamic IP address allocation systems used by some service providers;
  328. if the IP address in the configuration file is left blank or set
  329. to Auto, the insertion of GetIP at the appropriate point in the
  330. auto-logon script will enable the IP address of your machine to
  331. be configured according to the dotted decimal IP address sent
  332. by the service provider.</FONT>
  333. <P>
  334. <FONT SIZE=3>If the IP address in the configuration file were
  335. left blank, the new IP address as returned by the service provider
  336. is put in the appropriate field in the configuration file and
  337. the file is then re-saved.</FONT>
  338. <P>
  339. <FONT SIZE=3>If the IP address field in the configuration file
  340. contains the string "Auto", the IP address returned
  341. by the service provider is used for the duration of the session,
  342. but the contents of the configuration file are not altered.</FONT>
  343. <P>
  344. <FONT SIZE=3>If the IP address in the configuration file already
  345. has an IP address in it, the GetIP command is ignored.</FONT>
  346. <H2><A NAME="Scripting">Scripting</A> Language Command Set</H2>
  347. <H4>Abort </H4>
  348. <P>
  349. <FONT SIZE=3>Syntax: <TT> Abort <string> </FONT></TT>
  350. <P>
  351. <FONT SIZE=3>This adds the specified string to the list of abort
  352. strings. If any string in this list is received from the service
  353. provider, the script is aborted with the error "Script aborted
  354. (<string>)". Acorn Internet software will then try
  355. to re-establish the connection to the service provider, in accordance
  356. with the parameters passed to the Retry command (q.v.)</FONT>
  357. <H4>Config </H4>
  358. <P>
  359. <FONT SIZE=3>Syntax: <TT>Config <interface>
  360. </FONT></TT>
  361. <P>
  362. <FONT SIZE=3>Configures the named interface as a machine-to-provider
  363. link connecting the configured IP address with the configured
  364. gateway.</FONT>
  365. <H4>Dial </H4>
  366. <P>
  367. <FONT SIZE=3>Syntax: <TT>Dial </FONT></TT>
  368. <P>
  369. <FONT SIZE=3>Send either ATDT or ATDP (Hayes modem commands for
  370. tone and pulse dialling respectively) to the modem, depending
  371. on the configured dial method, followed by the configured telephone
  372. number.</FONT>
  373. <H4>Echo </H4>
  374. <P>
  375. <FONT SIZE=3>Syntax: <TT>Echo </FONT></TT>
  376. <P>
  377. <FONT SIZE=3>Sets the server to echo incoming data to the server
  378. log.</FONT>
  379. <H4>GetIFAddr </H4>
  380. <P>
  381. <FONT SIZE=3>Syntax: <TT>GetIFAddr
  382. <interface> </FONT></TT>
  383. <P>
  384. <FONT SIZE=3>Attempts to determine the IP address of the interface
  385. when using dynamic IP allocation. The command waits for five seconds,
  386. during which time the remote system should reply with the address;
  387. if this does not happen, the command times out, generating an
  388. error and aborting the logon script.</FONT>
  389. <H4>GetIP </H4>
  390. <P>
  391. <FONT SIZE=3>Syntax: <TT>GetIP </FONT></TT>
  392. <P>
  393. <FONT SIZE=3>If the IP address in the configuration file is left
  394. blank or set to Auto, this command looks in the input from the
  395. service provider for an IP address and configures it as the IP
  396. address to use for the local machine (giving the functionality
  397. of dynamic IP allocation).</FONT>
  398. <P>
  399. <FONT SIZE=3>If the IP address in the configuration file was left
  400. blank, the new IP address as returned by the service provider
  401. is put in the appropriate field in the configuration file and
  402. the file is then re-saved.</FONT>
  403. <P>
  404. <FONT SIZE=3>If the IP address in the configuration file already
  405. has an IP address in it, the GetIP command is ignored.</FONT>
  406. <H4>Hangup </H4>
  407. <P>
  408. <FONT SIZE=3>Syntax: <TT>Hangup </FONT></TT>
  409. <P>
  410. <FONT SIZE=3>This command waits for one second, then sends "+++"
  411. to the modem, followed by another one second pause. It then sends
  412. the configured hangup string to the modem.</FONT>
  413. <H4>Init </H4>
  414. <P>
  415. <FONT SIZE=3>Syntax: <TT>Init </FONT></TT>
  416. <P>
  417. <FONT SIZE=3>This command sends the configured init string to
  418. the modem.</FONT>
  419. <H4>Login </H4>
  420. <P>
  421. <FONT SIZE=3>Syntax: <TT>Login </FONT></TT>
  422. <P>
  423. <FONT SIZE=3>This command sends the configured local system name
  424. to the service provider, followed by a carriage return.</FONT>
  425. <H4>News</H4>
  426. <P>
  427. <FONT SIZE=3>Retry Syntax: <TT> NewsRetry
  428. <n> </FONT></TT>
  429. <P>
  430. <FONT SIZE=3>Sets the number of retries to use when attempting
  431. to connect to the USENET News server.</FONT>
  432. <H4>NoEcho </H4>
  433. <P>
  434. <FONT SIZE=3>Syntax: <TT> NoEcho </FONT></TT>
  435. <P>
  436. <FONT SIZE=3>Stops the server from echoing incoming data in the
  437. system log.</FONT>
  438. <H4>OS Command </H4>
  439. <P>
  440. <FONT SIZE=3>Syntax: <TT>*<command>
  441. </FONT></TT>
  442. <P>
  443. <FONT SIZE=3>Passes a command to the RISC OS Supervisor for execution.</FONT>
  444. <H4>Password </H4>
  445. <P>
  446. <FONT SIZE=3>Syntax: <TT>Password
  447. </FONT></TT>
  448. <P>
  449. <FONT SIZE=3>Sends the configured password followed by a carriage
  450. return.</FONT>
  451. <H4>Retry </H4>
  452. <P>
  453. <FONT SIZE=3>Syntax: <TT>Retry x y
  454. z </FONT></TT>
  455. <P>
  456. <FONT SIZE=3>Sets the number of times the system attempts to make
  457. a connection to the service provider.</FONT>
  458. <P>
  459. <TT>x</FONT></TT><FONT SIZE=3> = number of
  460. times to retry before failure </FONT>
  461. <P>
  462. <TT>y</FONT></TT><FONT SIZE=3> = time in
  463. seconds between first and second attempts </FONT>
  464. <P>
  465. <TT>z</FONT></TT><FONT SIZE=3> = time in
  466. seconds between second and subsequent attempts</FONT>
  467. <H4>Route </H4>
  468. <P>
  469. <FONT SIZE=3>Syntax: <TT>Route </FONT></TT>
  470. <P>
  471. <FONT SIZE=3>Sets a default IP route through the configured gateway
  472. address.</FONT>
  473. <H4>Send </H4>
  474. <P>
  475. <FONT SIZE=3>Syntax: <TT>Send <string>
  476. </FONT></TT>
  477. <P>
  478. <FONT SIZE=3>Sends the attached string to the modem, terminated
  479. by a carriage return.</FONT>
  480. <H4>SerialSetup </H4>
  481. <P>
  482. <FONT SIZE=3>Syntax: <TT>SerialSetup</FONT></TT><FONT SIZE=3>
  483. </FONT>
  484. <P>
  485. <FONT SIZE=3>Configures the serial port to match the configured
  486. setup parameters.</FONT>
  487. <H4>Timeout </H4>
  488. <P>
  489. <FONT SIZE=3>Syntax: <TT>Timeout <n>
  490. </FONT></TT>
  491. <P>
  492. <FONT SIZE=3>Sets the delay in seconds to n before a wait times
  493. out.</FONT>
  494. <H4>Wait </H4>
  495. <P>
  496. <FONT SIZE=3>Syntax: <TT>Wait <string>
  497. </FONT></TT>
  498. <P>
  499. <FONT SIZE=3>Waits for string to be received from the service
  500. provider. The string is case sensitive. If the string is not received
  501. within the time set by the Timeout command (q.v.) the script will
  502. terminate with the error "Script timed out."</FONT>
  503. <H2><A NAME="pppconnect">pppconnect</A> for RISC OS</H2>
  504. <H4>Synopsis </H4>
  505. <P>
  506. <TT>*PPPConnect [<driver>[:<port>]]
  507. [speed] [options]</FONT></TT>
  508. <H4>Description </H4>
  509. <P>
  510. <FONT SIZE=3>The Point-to-Point Protocol (PPP) provides a method
  511. for transmitting datagrams over serial point-to-point links. PPP
  512. is composed of three parts: a method for encapsulating datagrams
  513. over serial links, an extensible Link Control Protocol (LCP),
  514. and a family of Network Control Protocols (NCP) for establishing
  515. and configuring different network-layer protocols.</FONT>
  516. <P>
  517. <FONT SIZE=3>The encapsulation scheme is provided by driver code
  518. in the kernel. pppd provides the basic LCP, authentication support,
  519. and an NCP for establishing and configuring the Internet Protocol
  520. (IP) (called the IP Control Protocol, IPCP).</FONT>
  521. <H4>Frequently used options </H4>
  522. <P>
  523. <TT><driver>[:<port>] </FONT></TT>
  524. <P>
  525. <FONT SIZE=3>Load the named blockdriver from SerialDev:Modules,
  526. and use the given port for communication. If this is not specified,
  527. the previously used driver will be used. The PPP module contains
  528. the Internal driver, which will be used if this option is never
  529. specified.</FONT>
  530. <P>
  531. <TT><speed> </FONT></TT>
  532. <P>
  533. <FONT SIZE=3>Set the baud rate to </FONT><TT><speed></FONT></TT><FONT SIZE=3>.
  534. The available speeds depend on the device you are using. If not
  535. specified, it will use the current setting of the chosen driver.</FONT>
  536. <P>
  537. <TT>asyncmap <map> </FONT></TT>
  538. <P>
  539. <FONT SIZE=3>Set the async character map to </FONT><TT><map></FONT></TT><FONT SIZE=3>.
  540. This map describes which control characters cannot be successfully
  541. received over the serial line. PPP will ask the peer to send these
  542. characters as a 2-byte escape sequence. The argument is a 32-bit
  543. hex number with each bit representing a character to escape. Bit
  544. 0 (00000001) represents the character 0x00; bit 31 (80000000)
  545. represents the character 0x1f or ^_. If multiple asyncmap options
  546. are given, the values are ORed together. If no asyncmap option
  547. is given, no async character map will be negotiated for the receive
  548. direction; the peer will then escape all control characters.</FONT>
  549. <P>
  550. <TT>auth </FONT></TT>
  551. <P>
  552. <FONT SIZE=3>Require the peer to authenticate itself before allowing
  553. network packets to be sent or received.</FONT>
  554. <P>
  555. <TT>crtscts </FONT></TT>
  556. <P>
  557. <FONT SIZE=3>Use hardware flow control (i.e. RTS/CTS) to control
  558. the flow of data on the serial port.</FONT>
  559. <P>
  560. <TT>xonxoff </FONT></TT>
  561. <P>
  562. <FONT SIZE=3>Use software flow control (i.e. XON/XOFF) to control
  563. the flow of data on the serial port. If neither this option nor
  564. the previous is used, the current state of the driver will be
  565. used</FONT>
  566. <P>
  567. <TT>-crtscts </FONT></TT>
  568. <P>
  569. <FONT SIZE=3>A synonym for xonxoff.</FONT>
  570. <P>
  571. <TT>defaultroute </FONT></TT>
  572. <P>
  573. <FONT SIZE=3>Add a default route to the system routing tables,
  574. using the peer as the gateway, when IPCP negotiation is successfully
  575. completed. This entry is removed when the PPP connection is broken.</FONT>
  576. <P>
  577. <TT>escape xx,yy,... </FONT></TT>
  578. <P>
  579. <FONT SIZE=3>Specifies that certain characters should be escaped
  580. on transmission (regardless of whether the peer requests them
  581. to be escaped with its async control character map). The characters
  582. to be escaped are specified as a list of hex numbers separated
  583. by commas. Note that almost any character can be specified for
  584. the escape option, unlike the asyncmap option which only allows
  585. control characters to be specified. The characters which may not
  586. be escaped are those with hex values 0x20 - 0x3f or 0x5e.</FONT>
  587. <P>
  588. <TT>file <f> </FONT></TT>
  589. <P>
  590. <FONT SIZE=3>Read options from file <f> (the format is described
  591. below).</FONT>
  592. <P>
  593. <TT>mru <n> </FONT></TT>
  594. <P>
  595. <FONT SIZE=3>Set the MRU [Maximum Receive Unit] value to <n>
  596. for negotiation. pppd will ask the peer to send packets of no
  597. more than <n> bytes. The minimum MRU value is 128. The default
  598. MRU value is 1500. A value of 296 is recommended for slow links
  599. (40 bytes for TCP/IP header + 256 bytes of data).</FONT>
  600. <P>
  601. <TT>netmask <n> </FONT></TT>
  602. <P>
  603. <FONT SIZE=3>Set the interface netmask to <n>, a 32 bit
  604. netmask in "decimal dot" notation (e.g. 255.255.255.0).</FONT>
  605. <P>
  606. <TT>passive</FONT></TT><FONT SIZE=3> </FONT>
  607. <P>
  608. <FONT SIZE=3>Enables the "passive" option in the LCP.
  609. With this option, pppd will attempt to initiate a connection;
  610. if no reply is received from the peer, pppd will then just wait
  611. passively for a valid LCP packet from the peer (instead of exiting,
  612. as it does without this option).</FONT>
  613. <P>
  614. <TT>silent </FONT></TT>
  615. <P>
  616. <FONT SIZE=3>With this option, pppd will not transmit LCP packets
  617. to initiate a connection until a valid LCP packet is received
  618. from the peer (as for the "passive" option with old
  619. versions of pppd).</FONT>
  620. <H4>Options </H4>
  621. <P>
  622. <TT><local_IP_address>:<remote_IP_address>
  623. </FONT></TT>
  624. <P>
  625. <FONT SIZE=3>Set the local and/or remote interface IP addresses.
  626. Either one may be omitted. The IP addresses can be specified with
  627. a host name or in decimal dot notation (e.g. 150.234.56.78). The
  628. default local address is the (first) IP address of the system
  629. (unless the noipdefault option is given). The remote address will
  630. be obtained from the peer if not specified in any option. Thus,
  631. in simple cases, this option is not required. If a local and/or
  632. remote IP address is specified with this option, pppd will not
  633. accept a different value from the peer in the IPCP negotiation,
  634. unless the ipcp-accept-local and/or ipcp-accept-remote options
  635. are given, respectively.</FONT>
  636. <P>
  637. <TT>-all </FONT></TT>
  638. <P>
  639. <FONT SIZE=3>Don't request or allow negotiation of any options
  640. for LCP and IPCP (use default values).</FONT>
  641. <P>
  642. <TT>-ac </FONT></TT>
  643. <P>
  644. <FONT SIZE=3>Disable Address/Control compression negotiation (use
  645. default, i.e. address/control field disabled).</FONT>
  646. <P>
  647. <TT>-am</FONT></TT><FONT SIZE=3> </FONT>
  648. <P>
  649. <FONT SIZE=3>Disable asyncmap negotiation (use the default asyncmap,
  650. i.e. escape all control characters)</FONT>
  651. <P>
  652. <TT>-as <n> </FONT></TT>
  653. <P>
  654. <FONT SIZE=3>Same as asyncmap <n></FONT>
  655. <P>
  656. <TT>-ip </FONT></TT>
  657. <P>
  658. <FONT SIZE=3>Disable IP address negotiation (with this option,
  659. the remote IP address must be specified with an option on the
  660. command line or in an options file).</FONT>
  661. <P>
  662. <TT>-mn </FONT></TT>
  663. <P>
  664. <FONT SIZE=3>Disable magic number negotiation. With this option,
  665. pppd cannot detect a looped-back line.</FONT>
  666. <P>
  667. <TT>-mru </FONT></TT>
  668. <P>
  669. <FONT SIZE=3>Disable MRU [Maximum Receive Unit] negotiation (use
  670. default, i.e. 1500).</FONT>
  671. <P>
  672. <TT>-p</FONT></TT><FONT SIZE=3> </FONT>
  673. <P>
  674. <FONT SIZE=3>Same as the passive option.</FONT>
  675. <P>
  676. <TT>-pc </FONT></TT>
  677. <P>
  678. <FONT SIZE=3>Disable protocol field compression negotiation (use
  679. default, i.e. protocol field compression disabled).</FONT>
  680. <P>
  681. <TT>+ua <p> </FONT></TT>
  682. <P>
  683. <FONT SIZE=3>Agree to authenticate using PAP [Password Authentication
  684. Protocol] if requested by the peer, and use the data in file <p>
  685. for the user and password to send to the peer. The file contains
  686. the remote user name, followed by a newline, followed by the remote
  687. password, followed by a newline. This option is obsolescent.</FONT>
  688. <P>
  689. <TT>+pap </FONT></TT>
  690. <P>
  691. <FONT SIZE=3>Require the peer to authenticate itself using PAP.</FONT>
  692. <P>
  693. <TT>-pap </FONT></TT>
  694. <P>
  695. <FONT SIZE=3>Don't agree to authenticate using PAP.</FONT>
  696. <P>
  697. <TT>+chap </FONT></TT>
  698. <P>
  699. <FONT SIZE=3>Require the peer to authenticate itself using CHAP
  700. [Cryptographic Handshake Authentication Protocol] authentication.</FONT>
  701. <P>
  702. <TT>-chap</FONT></TT><FONT SIZE=3> </FONT>
  703. <P>
  704. <FONT SIZE=3>Don't agree to authenticate using CHAP.</FONT>
  705. <P>
  706. <TT>-vj </FONT></TT>
  707. <P>
  708. <FONT SIZE=3>Disable negotiation of Van Jacobson style IP header
  709. compression. This is the default above line speeds of 19200 baud,
  710. as Van Jacobson suffers from diminishing returns at high line
  711. speeds, and can be badly affected by a poor link. The main aim
  712. of VJ compression is to improve responsiveness of interactive
  713. traffic, eg typing via Telnet, over slow lines. It will not generally
  714. speed up file transfers, such as FTP.</FONT>
  715. <P>
  716. <TT>+vj </FONT></TT>
  717. <P>
  718. <FONT SIZE=3>Enable negotiation of Van Jacobson stype IP header
  719. compression. This is the default at line speeds of 19200 baud
  720. or below.</FONT>
  721. <P>
  722. <TT>domain <d> </FONT></TT>
  723. <P>
  724. <FONT SIZE=3>Append the domain name <d> to the local host
  725. name for authentication purposes. For example, if gethostname()
  726. returns the name porsche, but the fully qualified domain name
  727. is porsche.Quotron.COM, you would use the domain option to set
  728. the domain name to Quotron.COM</FONT>
  729. <P>
  730. <TT>modem </FONT></TT>
  731. <P>
  732. <FONT SIZE=3>Use the modem control lines, ie signal to the modem
  733. using DTR, and check for hang-ups via DCD.</FONT>
  734. <P>
  735. <TT>local </FONT></TT>
  736. <P>
  737. <FONT SIZE=3>Don't use the modem control lines.</FONT>
  738. <P>
  739. <TT>mtu <n> </FONT></TT>
  740. <P>
  741. <FONT SIZE=3>Set the MTU [Maximum Transmit Unit] value to <n>.
  742. Unless the peer requests a smaller value via MRU negotiation,
  743. pppd will request that the kernel networking code send data packets
  744. of no more than n bytes through the PPP network interface.</FONT>
  745. <P>
  746. <TT>name <n> </FONT></TT>
  747. <P>
  748. <FONT SIZE=3>Set the name of the local system for authentication
  749. purposes to <n>.</FONT>
  750. <P>
  751. <TT>user <u> </FONT></TT>
  752. <P>
  753. <FONT SIZE=3>Set the user name to use for authenticating this
  754. machine with the peer using PAP to <u>.</FONT>
  755. <P>
  756. <TT>usehostname </FONT></TT>
  757. <P>
  758. <FONT SIZE=3>Enforce the use of the hostname as the name of the
  759. local system for authentication purposes (overrides the name option).</FONT>
  760. <P>
  761. <TT>remotename <n> </FONT></TT>
  762. <P>
  763. <FONT SIZE=3>Set the assumed name of the remote system for authentication
  764. purposes to <n>.</FONT>
  765. <P>
  766. <TT>noipdefault </FONT></TT>
  767. <P>
  768. <FONT SIZE=3>Disables the default behaviour when no local IP address
  769. is specified, which is to determine (if possible) the local IP
  770. address from the hostname. With this option, the peer will have
  771. to supply the local IP address during IPCP negotiation (unless
  772. it specified explicitly on the command line or in an options file).</FONT>
  773. <P>
  774. <TT>lcp-echo-interval <n> </FONT></TT>
  775. <P>
  776. <FONT SIZE=3>If this option is given, pppd will send an LCP echo-request
  777. frame to the peer every n seconds. Under Linux, the echo-request
  778. is sent when no packets have been received from the peer for n
  779. seconds. Normally the peer should respond to the echo-request
  780. by sending an echo-reply. This option can be used with the lcp-echo-failure
  781. option to detect that the peer is no longer connected.</FONT>
  782. <P>
  783. <TT>lcp-echo-failure <n> </FONT></TT>
  784. <P>
  785. <FONT SIZE=3>If this option is given, pppd will presume the peer
  786. to be dead if n LCP echo-requests are sent without receiving a
  787. valid LCP echo-reply. If this happens, pppd will terminate the
  788. connection. Use of this option requires a non-zero value for the
  789. lcp-echo-interval parameter. This option can be used to enable
  790. pppd to terminate after the physical connection has been broken
  791. (e.g., the modem has hung up) in situations where no hardware
  792. modem control lines are available.</FONT>
  793. <P>
  794. <TT>lcp-restart <n> </FONT></TT>
  795. <P>
  796. <FONT SIZE=3>Set the LCP restart interval (retransmission timeout)
  797. to <n> seconds (default 3).</FONT>
  798. <P>
  799. <TT>lcp-max-terminate <n></FONT></TT><FONT SIZE=3>
  800. </FONT>
  801. <P>
  802. <FONT SIZE=3>Set the maximum number of LCP terminate-request transmissions
  803. to <n> (default 3).</FONT>
  804. <P>
  805. <TT>lcp-max-configure <n> </FONT></TT>
  806. <P>
  807. <FONT SIZE=3>Set the maximum number of LCP configure-request transmissions
  808. to <n> (default 10).</FONT>
  809. <P>
  810. <TT>lcp-max-failure <n></FONT></TT><FONT SIZE=3>
  811. </FONT>
  812. <P>
  813. <FONT SIZE=3>Set the maximum number of LCP configure-NAKs returned
  814. before starting to send configure-Rejects instead to <n>
  815. (default 10).</FONT>
  816. <P>
  817. <TT>ipcp-restart <n> </FONT></TT>
  818. <P>
  819. <FONT SIZE=3>Set the IPCP restart interval (retransmission timeout)
  820. to <n> seconds (default 3).</FONT>
  821. <P>
  822. <TT>ipcp-max-terminate <n> </FONT></TT>
  823. <P>
  824. <FONT SIZE=3>Set the maximum number of IPCP terminate-request
  825. transmissions to <n> (default 3).</FONT>
  826. <P>
  827. <TT>ipcp-max-configure <n></FONT></TT><FONT SIZE=3>
  828. </FONT>
  829. <P>
  830. <FONT SIZE=3>Set the maximum number of IPCP configure-request
  831. transmissions to <n> (default 10).</FONT>
  832. <P>
  833. <TT>ipcp-max-failure <n></FONT></TT><FONT SIZE=3>
  834. </FONT>
  835. <P>
  836. <FONT SIZE=3>Set the maximum number of IPCP configure-NAKs returned
  837. before starting to send configure-Rejects instead to<n>
  838. (default 10).</FONT>
  839. <P>
  840. <TT>pap-restart <n></FONT></TT><FONT SIZE=3>
  841. </FONT>
  842. <P>
  843. <FONT SIZE=3>Set the PAP restart interval (retransmission timeout)
  844. to <n> seconds (default 3).</FONT>
  845. <P>
  846. <TT>pap-max-authreq <n></FONT></TT><FONT SIZE=3>
  847. </FONT>
  848. <P>
  849. <FONT SIZE=3>Set the maximum number of PAP authenticate-request
  850. transmissions to <n> (default 10).</FONT>
  851. <P>
  852. <TT>chap-restart <n></FONT></TT><FONT SIZE=3>
  853. </FONT>
  854. <P>
  855. <FONT SIZE=3>Set the CHAP restart interval (retransmission timeout
  856. for challenges) to <n> seconds (default 3).</FONT>
  857. <P>
  858. <TT>chap-max-challenge <n></FONT></TT><FONT SIZE=3>
  859. </FONT>
  860. <P>
  861. <FONT SIZE=3>Set the maximum number of CHAP challenge transmissions
  862. to <n> (default 10).</FONT>
  863. <P>
  864. <TT>chap-interval <n> </FONT></TT>
  865. <P>
  866. <FONT SIZE=3>If this option is given, pppd will rechallenge the
  867. peer every <n> seconds.</FONT>
  868. <P>
  869. <TT>ipcp-accept-local </FONT></TT>
  870. <P>
  871. <FONT SIZE=3>With this option, pppd will accept the peer's idea
  872. of our local IP address, even if the local IP address was specified
  873. in an option.</FONT>
  874. <P>
  875. <TT>ipcp-accept-remote </FONT></TT>
  876. <P>
  877. <FONT SIZE=3>With this option, pppd will accept the peer's idea
  878. of its (remote) IP address, even if the remote IP address was
  879. specified in an option.</FONT>
  880. <H3>Options files </H3>
  881. <P>
  882. <FONT SIZE=3>Options can be taken from files as well as the command
  883. line. PPP reads options from the files InetDbase:PPP.options before
  884. looking at the command line. An options file is parsed into a
  885. series of words, delimited by whitespace. Whitespace can be included
  886. in a word by enclosing the word in quotes ("). A backslash
  887. (\) quotes the following character. A hash (#) starts a comment,
  888. which continues until the end of the line.</FONT>
  889. <H2><A NAME="Authentication">Authentication</A></H2>
  890. <P>
  891. <FONT SIZE=3>PPP provides system administrators with sufficient
  892. access control that PPP access to a server machine can be provided
  893. to legitimate users without fear of compromising the security
  894. of the server or the network it's on. In part this is provided
  895. by the InetDbase:PPP.options file, where the administrator can
  896. place options to require authentication whenever PPP is run, and
  897. in part by the PAP and CHAP secrets files, where the administrator
  898. can restrict the set of IP addresses which individual users may
  899. use.</FONT>
  900. <P>
  901. <FONT SIZE=3>The default behaviour of PPP is to agree to authenticate
  902. if requested, and not to require authentication from the peer.
  903. However, PPP will not agree to authenticate itself with a particular
  904. protocol if it has no secrets which could be used to do so.</FONT>
  905. <P>
  906. <FONT SIZE=3>Authentication is based on secrets, which are selected
  907. from secrets files (InetDBase:PPP.PAPSecrets for PAP, InetDBase:PPP.CHAPSecret
  908. for CHAP). Both secrets files have the same format, and both can
  909. store secrets for several combinations of server (authenticating
  910. peer) and client (peer being authenticated). Note that pppd can
  911. be both a server and client, and that different protocols can
  912. be used in the two directions if desired.</FONT>
  913. <P>
  914. <FONT SIZE=3>A secrets file is parsed into words as for a options
  915. file. A secret is specified by a line containing at least three
  916. words, in the order client, server, secret. Any following words
  917. on the same line are taken to be a list of acceptable IP addresses
  918. for that client. If there are only three words on the line, it
  919. is assumed that any IP address is OK; to disallow all IP addresses,
  920. use "-". If the secret starts with an `@', what follows
  921. is assumed to be the name of a file from which to read the secret.
  922. A "*" as the client or server name matches any name.
  923. When selecting a secret, pppd takes the best match, i.e. the match
  924. with the fewest wildcards.</FONT>
  925. <P>
  926. <FONT SIZE=3>Thus a secrets file contains both secrets for use
  927. in authenticating other hosts, plus secrets which we use for authenticating
  928. ourselves to others. Which secret to use is chosen based on the
  929. names of the host (the `local name') and its peer (the `remote
  930. name'). The local name is set as follows:</FONT>
  931. <P>
  932. <FONT SIZE=3>if the usehostname option is given, then the local
  933. name is the hostname of this machine (with the domain appended,
  934. if given)</FONT>
  935. <P>
  936. <FONT SIZE=3>else if the name option is given, then use the argument
  937. of the first name option seen</FONT>
  938. <P>
  939. <FONT SIZE=3>else if the local IP address is specified with a
  940. hostname, then use that name </FONT>
  941. <P>
  942. <FONT SIZE=3>else use the hostname of this machine (with the domain
  943. appended, if given) </FONT>
  944. <P>
  945. <FONT SIZE=3>When authenticating ourselves using PAP, there is
  946. also a `username' which is the local name by default, but can
  947. be set with the user option or the +ua option.</FONT>
  948. <P>
  949. <FONT SIZE=3>The remote name is set as follows:</FONT>
  950. <P>
  951. <FONT SIZE=3>if the remotename option is given, then use the argument
  952. of the last remotename option seen</FONT>
  953. <P>
  954. <FONT SIZE=3>else if the remote IP address is specified with a
  955. hostname, then use that host name</FONT>
  956. <P>
  957. <FONT SIZE=3>else the remote name is the null string "".</FONT>
  958. <P>
  959. <FONT SIZE=3>Secrets are selected from the PAP secrets file as
  960. follows:</FONT>
  961. <UL>
  962. <LI><FONT SIZE=3>For authenticating the peer, look for a secret
  963. with client == username specified in the PAP authenticate-request,
  964. and server == local name.</FONT>
  965. <LI><FONT SIZE=3>For authenticating ourselves to the peer, look
  966. for a secret with client == our username, server == remote name.</FONT>
  967. </UL>
  968. <P>
  969. <FONT SIZE=3>When authenticating the peer with PAP, a secret of
  970. "" matches any password supplied by the peer. If the
  971. password doesn't match the secret, the password is encrypted using
  972. crypt() and checked against the secret again; thus secrets for
  973. authenticating the peer can be stored in encrypted form. Thus,
  974. the system administrator can set up the PAP secrets file to allow
  975. PPP access only to certain users, and to restrict the set of IP
  976. addresses that each user can use.</FONT>
  977. <P>
  978. <FONT SIZE=3>Secrets are selected from the CHAP secrets file as
  979. follows:</FONT>
  980. <UL>
  981. <LI><FONT SIZE=3>For authenticating the peer, look for a secret
  982. with client == name specified in the CHAP-Response message, and
  983. server == local name.</FONT>
  984. <LI><FONT SIZE=3>For authenticating ourselves to the peer, look
  985. for a secret with client == local name, and server == name specified
  986. in the CHAP-Challenge message.</FONT>
  987. </UL>
  988. <P>
  989. <FONT SIZE=3>Authentication must be satisfactorily completed before
  990. IPCP (or any other Network Control Protocol) can be started. If
  991. authentication fails, pppd will terminated the link (by closing
  992. LCP). If IPCP negotiates an unacceptable IP address for the remote
  993. host, IPCP will be closed. IP packets can only be sent or received
  994. when IPCP is open.</FONT>
  995. <P>
  996. <FONT SIZE=3>In some cases it is desirable to allow some hosts
  997. which can't authenticate themselves to connect and use one of
  998. a restricted set of IP addresses, even when the local host generally
  999. requires authentication. If the peer refuses to authenticate itself
  1000. when requested, pppd takes that as equivalent to authenticating
  1001. with PAP using the empty string for the username and password.
  1002. Thus, by adding a line to the pap-secrets file which specifies
  1003. the empty string for the client and password, it is possible to
  1004. allow restricted access to hosts which refuse to authenticate
  1005. themselves.</FONT>
  1006. <H2><A NAME="Routing">Routing</A></H2>
  1007. <P>
  1008. <FONT SIZE=3>When IPCP negotiation is completed successfully,
  1009. pppd will inform the kernel of the local and remote IP addresses
  1010. for the ppp interface. This is sufficient to create a host route
  1011. to the remote end of the link, which will enable the peers to
  1012. exchange IP packets. Communication with other machines generally
  1013. requires further modification to routing tables and/or ARP (Address
  1014. Resolution Protocol) tables. In some cases this will be done automatically
  1015. through the actions of the routed or gated daemons, but in most
  1016. cases some further intervention is required.</FONT>
  1017. <P>
  1018. <FONT SIZE=3>Sometimes it is desirable to add a default route
  1019. through the remote host, as in the case of a machine whose only
  1020. connection to the Internet is through the ppp interface. The defaultroute
  1021. option causes PPP to create such a default route when IPCP comes
  1022. up, and delete it when the link is terminated.</FONT>
  1023. <P>
  1024. <FONT SIZE=3>In some cases it is desirable to use proxy ARP, for
  1025. example on a server machine connected to a LAN, in order to allow
  1026. other hosts to communicate with the remote host. The proxy-arp
  1027. option causes pppd to look for a network interface on the same
  1028. subnet as the remote host (an interface supporting broadcast and
  1029. ARP, which is up and not a point-to-point or loopback interface).
  1030. If found, PPP creates a permanent, published ARP entry with the
  1031. IP address of the remote host and the hardware address of the
  1032. network interface found. (Not implemented yet)</FONT>
  1033. <H3>Examples </H3>
  1034. <P>
  1035. <FONT SIZE=3>In the simplest case, you can connect the serial
  1036. ports of two machines and issue a command like</FONT>
  1037. <P>
  1038. <TT>*PPPConnect InternalPC 9600 passive</FONT></TT>
  1039. <P>
  1040. <FONT SIZE=3>If you are using a modem, you will need to run a
  1041. dialler, such as Chat, to make the initial connection. If your
  1042. serial connection is any more complicated than a piece of wire,
  1043. you may need to arrange for some control characters to be escaped.
  1044. In particular, it is often useful to escape XON (^Q) and XOFF
  1045. (^S), using asyncmap a0000. If you need to authenticate yourself
  1046. to the remote end, using PAP, you would use a command like </FONT>
  1047. <P>
  1048. <TT>*PPPConnect 115200 user m.jones </FONT></TT>
  1049. <P>
  1050. <FONT SIZE=3>and have a line in your PAP secrets file </FONT>
  1051. <P>
  1052. <TT>m.jones * abcdefg </FONT></TT>
  1053. <P>
  1054. <FONT SIZE=3>meaning that user m.jones should be authenticated
  1055. to any host with the password abcdefg. </FONT>
  1056. <P>
  1057. <FONT SIZE=3>To close the link, issue the command </FONT>
  1058. <P>
  1059. <TT>*PPPDisconnect</FONT></TT>
  1060. <H3>Diagnostics </H3>
  1061. <P>
  1062. <FONT SIZE=3>The contents of all control packets sent or received
  1063. are logged, that is, all LCP, PAP, CHAP or IPCP packets. This
  1064. can be useful if the PPP negotiation does not succeed. The log
  1065. can be displayed using the *PPPLog command. The *PPPInfo command
  1066. provides standard network driver statistics.</FONT>
  1067. <H3>Files </H3>
  1068. <P>
  1069. <TT>InetDBase:PPP.IP-Up </FONT></TT>
  1070. <P>
  1071. <FONT SIZE=3>A program or script which is executed when the link
  1072. is available for sending and receiving IP packets (that is, IPCP
  1073. has come up). It is executed with the parameters interface-name
  1074. driver speed local-IP-address remote-IP-address.</FONT>
  1075. <P>
  1076. <FONT SIZE=3>This file is restricted in what it can do. In particular
  1077. it should not start a new application (eg running ifconfig). </FONT>
  1078. <P>
  1079. <TT>InetDBase:PPP.IP-Down </FONT></TT>
  1080. <P>
  1081. <FONT SIZE=3>A program or script which is executed when the link
  1082. is no longer available for sending and receiving IP packets. This
  1083. script can be used for undoing the effects of the InetDBase:PPP.IP-Up
  1084. script. It is invoked with the same parameters as the ip-up script.
  1085. The same restrictions apply.</FONT>
  1086. <P>
  1087. <TT>InetDBase:PPP.PAPSecrets </FONT></TT>
  1088. <P>
  1089. <FONT SIZE=3>Usernames, passwords and IP addresses for PAP authentication.</FONT>
  1090. <P>
  1091. <TT>InetDBase:PPP.CHAPSecret </FONT></TT>
  1092. <P>
  1093. <FONT SIZE=3>Names, secrets and IP addresses for CHAP authentication.</FONT>
  1094. <P>
  1095. <TT>InetDBase:PPP.Options </FONT></TT>
  1096. <P>
  1097. <FONT SIZE=3>System default options for PPP, read before command-line
  1098. options.</FONT>
  1099. <H3>Notes </H3>
  1100. <P>
  1101. <FONT SIZE=3>If you wish to check the state of the PPP connection
  1102. from an application, there are two things you need to check. </FONT>
  1103. <P>
  1104. <FONT SIZE=3>Using socketioctl (SIOCGIFFLAGS) will tell you whether
  1105. the IP layer is up (the IFF_UP flags). </FONT>
  1106. <P>
  1107. <FONT SIZE=3>To tell whether the PPP daemon is actually active
  1108. you will need to use the PPP_Stats SWI to examine the running
  1109. flag; the IFF_RUNNING flag from the socketioctl does not correctly
  1110. indicate the state of the daemon. </FONT>
  1111. <H2><A NAME="Bibliography">Bibliography</A></H2>
  1112. <P>
  1113. <FONT SIZE=3>RFC1144 </FONT>
  1114. <P>
  1115. <FONT SIZE=3>Jacobson, V. Compressing TCP/IP headers for low-speed
  1116. serial 1990 February.</FONT>
  1117. <P>
  1118. <FONT SIZE=3>RFC1321 </FONT>
  1119. <P>
  1120. <FONT SIZE=3>Rivest, R. The MD5 Message-Digest Algorithm. 1992
  1121. April.</FONT>
  1122. <P>
  1123. <FONT SIZE=3>RFC1332 </FONT>
  1124. <P>
  1125. <FONT SIZE=3>McGregor, G. PPP Internet Protocol Control Protocol
  1126. (IPCP). 1992 May.</FONT>
  1127. <P>
  1128. <FONT SIZE=3>RFC1334 </FONT>
  1129. <P>
  1130. <FONT SIZE=3>Lloyd, B.; Simpson, W.A. PPP authentication protocols.
  1131. 1992 October.</FONT>
  1132. <P>
  1133. <FONT SIZE=3>RFC1548 </FONT>
  1134. <P>
  1135. <FONT SIZE=3>Simpson, W.A. The Point-to-Point Protocol (PPP).
  1136. 1993 December.</FONT>
  1137. <P>
  1138. <FONT SIZE=3>RFC1549 </FONT>
  1139. <P>
  1140. <FONT SIZE=3>Simpson, W.A. PPP in HDLC Framing. 1993 December.
  1141. </FONT>
  1142. <P>
  1143. <A HREF="appxa"><IMG SRC="MiscImages/PREV" WIDTH="36" HEIGHT="36" BORDER="0"></A>
  1144. <A HREF="../Cover"><IMG SRC="MiscImages/START" WIDTH="36" HEIGHT="36" BORDER="0"></A>
  1145. <A HREF="prelms"><IMG SRC="MiscImages/CONTS" WIDTH="36" HEIGHT="36" BORDER="0"></A>
  1146. <A HREF="appxc"><IMG SRC="MiscImages/NEXT" WIDTH="36" HEIGHT="36" BORDER="0"></A>
  1147. <P>
  1148. </BODY>
  1149. </HTML>
  1150.